package com.example.mq.common;

import lombok.Data;

/**
 * 表示一个消费者
 */
@Data
public class ConsumerEnv {

    //消费者身份标识
    private String consumerTag;
    //队列名称
    private String queueName;
    //是否是自动确认消息，还是手动确认
    private boolean autoAck;
    private Consumer consumer;

    public ConsumerEnv(String consumerTag,String queueName,boolean autoAck,Consumer consumer) {
        this.autoAck = autoAck;
        this.consumer = consumer;
        this.consumerTag = consumerTag;
        this.queueName = queueName;
    }

    public ConsumerEnv(String consumerTag) {
        this.consumerTag = consumerTag;
    }
}
